﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using WorkHelperWCF.Model;

namespace WorkHelperWCF
{
    [ServiceContract]
    public interface IWorkHelperService
    {
        [OperationContract]
        [WebInvoke(Method = "POST",
                    BodyStyle=WebMessageBodyStyle.WrappedRequest,
                   ResponseFormat = WebMessageFormat.Xml, 
                   RequestFormat= WebMessageFormat.Json,
                   UriTemplate = "saveUser")]
        Boolean saveUser(string information, string password, int userid, string username);

        [OperationContract]
        [WebInvoke(Method = "GET",
                   BodyStyle = WebMessageBodyStyle.Bare,
                   ResponseFormat = WebMessageFormat.Json,
                   UriTemplate = "getUser?username={username}&password={password}")]
        User getUser(string username, string password);

        [OperationContract]
        Boolean saveUserService(User user);
    }
}
